package com.woniuxy.bankb.service.impl;

import com.woniuxy.bankb.mapper.BankaMapper;
import com.woniuxy.bankb.service.BankbService;
import com.woniuxy.common.entity.Bank;
import io.seata.spring.annotation.GlobalTransactional;
import org.springframework.beans.factory.annotation.Autowired;
import org.springframework.stereotype.Service;
import org.springframework.transaction.annotation.Transactional;

import javax.annotation.Resource;

/**
 * @Author: 曾令忠
 * @Description:
 * @Date: 2020/7/11 0011-上午 10:52
 */
@Service
public class BankbServiceImpl implements BankbService {
    @Resource
    BankaMapper bankaMapper;

    @GlobalTransactional
    public int addmoney(Bank bank) {
        return bankaMapper.addmoney(bank);
//        System.out.println(1/0);
    }
}
